cmake_minimum_required(VERSION 3.10)

project(ONVIF_CLEINT C)

# find_program(CCACHE_FOUND ccache)
# if(CCACHE_FOUND)
#    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
#    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
# endif(CCACHE_FOUND)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -ggdb -Wall -DWITH_DOM -DWITH_COOKIES -DWITH_OPENSSL")

include_directories(${PROJECT_SOURCE_DIR}/
					/usr/share/gsoap/plugin/
					/usr/share/gsoap/custom/)

set(GSOAP_SRCS
	/usr/share/gsoap/plugin/wsaapi.c
	/usr/share/gsoap/plugin/wsseapi.c
	/usr/share/gsoap/plugin/smdevp.c
	/usr/share/gsoap/plugin/mecevp.c
	/usr/share/gsoap/plugin/threads.c
	/usr/share/gsoap/custom/duration.c
	./soapC.c
	./soapClient.c)

	
set(CLIENT_SRCS ${GSOAP_SRCS}
	./main.c)

add_executable(client ${CLIENT_SRCS}) 

target_link_libraries(client gsoapssl ssl crypto)